package com.letoken.platform.repo.push.manager;

import com.alibaba.fastjson.JSONObject;
import com.letoken.platform.repo.app.po.AppUserTeam;
import com.letoken.platform.repo.push.constant.PushRabbitConstant;
import com.letoken.platform.repo.wallet.constant.AppRabbitConstant;
import com.letoken.platform.repo.wallet.req.WithdrawReq;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

@Component
public class AdminMQManager {

    public void withdrawNotify(RabbitTemplate rabbitTemplate, WithdrawReq req, Integer ms) {
        rabbitTemplate.convertAndSend(
                PushRabbitConstant.TOPIC_EXCHANGE_WS_MSG_ADMIN,
                PushRabbitConstant.QUEUE_WS_MSG_ADMIN,
                JSONObject.toJSON(req).toString()
//                message -> {
//                    message.getMessageProperties().setExpiration(ms.toString());
//                    return message;
//                }
        );
    }
}
